package com.bruce.starts.demo.thread.producer;

import java.util.ArrayList;

public class ProducerTest {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();

        Thread producer1 = new Thread(new Producer(list));
        //Thread producer2 = new Thread(new Producer(list));
        Thread consumer1 = new Thread(new Consumer(list));
        Thread consumer2 = new Thread(new Consumer(list));
        producer1.start();
        //producer2.start();
        consumer1.start();
        consumer2.start();
    }
}
